<template>
  <div>
   <mine-header :Userinfo="Userinfo"></mine-header>
   <mine-body :Userinfo="Userinfo"></mine-body>
  </div>
</template>
<script>
import MineHeader from "@/pages/tool/mine/components/Header";
import MineBody from "@/pages/tool/mine/components/Body";
import axios from 'axios'
export default {
   name:'Mine',
   components: {
    MineHeader,
    MineBody
  },
  data(){
    return{
      Userinfo:{}
    }
  },
  mounted(){
    if(localStorage.getItem("UserToken")){
      axios.post("http://81.68.253.206:8081/api/getUserInfo"
          ,{},
          {
            headers: {
            'token': localStorage.getItem("UserToken") }
            }
          ).then(res=>{
            if(res.data&&res.data.data&&res.data.status)
            {
              this.Userinfo=res.data;
            }
          })
    }
    
  }
}
</script>